"use strict";

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = (app) => {
    const { router, controller } = app;
    // 首页
    router.get("/", controller.home.index);
    // 添加备忘录
    router.post("/bwls", controller.bwl.create);
    // 备忘录列表
    router.get("/bwls", controller.bwl.index);
    // 备忘录详情
    router.get("/bwls/:id", controller.bwl.detail);
    // 备忘录修改
    router.put("/bwls/:id", controller.bwl.update);
    // 备忘录删除
    router.delete("/bwls/:id", controller.bwl.delete);
    // 获取验证码
    router.post("/codes", controller.code.create);
    // 登录接口
    router.post("/login", controller.home.login);
};
